/**
 * 用户 接口
 *
 */
import request from "@/utils/request";

let api = {};

api.login = function(data) {
    return request({
        url: "/admin/user/login",
        method: "post",
        data,
        headers: {
            notoken: true,
            isLogin: true,
        },
    });
};
//用户日志
api.useLog = function(data) {
    return request({
        url: "/admin/user/log",
        method: "get",
        params: data,
    });
};

api.upload = function(e) {
    let formdata = new FormData();
    formdata.append("file", e.file);
    return request({
        url: "/api/Common/upload",
        method: "post",
        data: formdata,
    });
};

// 更改当前用户密码
api.password = function(data = {}) {
    return request({
        url: "/admin/user/password",
        method: "post",
        data,
    });
};


export default api;